import React, { Component } from 'react'

class Input extends Component {
    render() {
        return (
            <div className="content1">
                <h4>~Today I need to~</h4>
                <div className="content1-all">
                    <div className="content1-input">
                        <input 
                            value={this.props.content}
                            type="text"
                            placeholder='Add new to do...'
                            autoFocus
                            onChange={e=>this.props.handleChange(e,"content")}
                        />
                    </div>
                    <button 
                        className="content1-btn"
                        type='submit' 
                        onClick={this.props.submitContent}
                    >
                        Submit
                    </button>
                </div>
        </div>
        )
    }
}

export default Input
